<include file="Public/min-header" /> <!--引入 js css img 文件-->
<link href="__PUBLIC__/css/page.css" rel="stylesheet" type="text/css"> <!--引入分页css 文件-->
</head>
<body>
    <!--导航  start //-->
<include file="Public/header" />
<!--------头部结束-------------->
<div id="main">
    <!--右边菜单-->
    <include file="Bank/menu"/>
    <!--右边菜单End-->
    <div class="mainfr-box">
        <div class="place">
            <span>当前位置：</span>
            <ul class="placeul">
                <li><a href="#">首页 ></a></li>
                <li><a href="#">财务管理 ></a></li>
                <li><a href="#">分享积分提现</a></li>
            </ul>
            <ul class="placeula">
                <li><a href="javascript:location.reload()"><span class="placea"></span>刷新</a></li>
                <li><a href="javascript:history.go(-1)"><span class="placea"></span>返回上一页</a></li>
            </ul>
        </div>
        <div class="clr"></div>
        <div class="main">
            <form action="" method="post" enctype="multipart/form-data" name="distribut_form" id="distribut_form">
                <table class="Register-table2">
                    <tr>
                        <th> 提现添加 <i>(&nbsp; {$tpshop_config['shopping_tikuan_1']} 起，并且是 {$tpshop_config['shopping_tikuan_2']} 的倍数，提现收取手续费：  {$tpshop_config['shopping_tikuan_3']} % )</i></th>
                    </tr> 
                </table>
                <table width="100%" border="0" class="Register-table">
                    <!-- <tr class="odd">
                        <th scope="row" width="130">呢称：</th>
                        <td>{$user.nickname}</td>
                        <th scope="row" width="130">手机：</th>
                        <td>{$user.mobile}</td>
                    </tr> -->
                    <tr class="odd">
                      <!--  <th scope="row" width="130">邮箱：</th>
                        <td>{$user.email}</td> -->
                        <th scope="row" width="130">账号：</th>
                        <td colspan="3">{$user.account}</td>
                    </tr>
                    <tr class="odd">
                        <th>分享积分：</th>
                        <td><span> ￥ {$user.share_points|default="0.00"}</span></td>
                        <th>提现金额：</th>
                        <td colspan="3"><input type="text" id="money" name="money" class="scinput" placeholder="最少提现额度{$tpshop_config['shopping_tikuan_1']}" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" onKeyUp="this.value = this.value.replace(/[^\d.]/g, '')"/></td>
                    </tr>
                    <tr class="odd">
                        <th>开户银行：</th>
                        <td><input id="bank_name" name="bank_opening" type="text" value="{$user.bank_opening}" readonly  class="scinput"></td>
                        <th >分行支行：</th>
                        <td style="line-height:35px;"><input name="bank_address" value="{$user.bank_address}" readonly  type="text" class="scinput" ></td>
                    </tr>
                    <tr class="odd">
                        <th>开户姓名：</th>
                        <td><input id="account_name" name="bank_name" type="text" class="scinput" value="{$user.bank_name}" readonly></td>
                        <th>银行账号：</th>
                        <td style="line-height:35px;"><input  id="account_bank" name="bank_account" type="text" value="{$user.bank_account}" readonly class="scinput" style="width:350px;"></td>
                    </tr>
                    <tr class="odd">
                        <th>交易密码：</th>
                        <td colspan="3"><input id="secpwd" name="secpwd" type="password" class="scinput" style="width:350px;"></td>
                    </tr>
                    <tr class="odd">
                        <td colspan="4" align="center"><i>提现须知：请仔细核对所列的账户资料是否存在误填，如需修改请【<b><a href="{:U('Home/User/info')}">前往这里</a></b>】</td>
                    </tr>
                </table>
                <div class="button-box"> 
                    <input type="button" onClick="checkSubmit();" value="提交" class="button-style" id="btn_midefy"></div>
            </form>
            <div class="clr"></div>
            <table class="Inquire-table2">
                <tr>
                    <th>ID</th>
                    <th>申请日期</th>     
                    <th>开户银行</th>
                    <th>分行支行</th>
                    <th>开户姓名</th>
                    <th>银行账号</th>
                    <th>金额</th>
                    <th>状态</th>
                </tr>
                <foreach name="list" item="v" > 
                    <tr>
                        <td>{$v['id']}</td>
                        <td>{$v['create_time']|date="Y-m-d",###}</td>
                        <td>{$v['bank_opening']}</td>
                        <td>{$v['bank_address']}</td>
                        <td>{$v['bank_name']}</td>
                        <td>{$v['bank_account']}</td>
                        <td>{$v['money']}</td>                    
                        <td>
                        <if condition="$v[status] eq 0">申请中</if>
                        <if condition="$v[status] eq 1">申请成功</if>
                        <if condition="$v[status] eq 2">申请失败</if>                    
                        </td>
                    </tr>
                </foreach>   
            </table>
            <div class="pages"><div align="right">{$show}</div></div>
        </div>
    </div>
    <!--foot-->
    <!--foot-->
    <div class="clr"></div>
    <!--footer start //-->
    <include file="Public/footer"   <!--引入底部 //-->
             <!--footer  end //-->
             </body>
        </html>
        <script>
        // 表单验证提交
            function checkSubmit() {
                var money = $.trim($('#money').val());
                var bank_name = $.trim($('#bank_name').val());
                var account_bank = $.trim($('#account_bank').val());
                var account_name = $.trim($('#account_name').val());
                var secpwd = $.trim($('#secpwd').val());

                if (money == '')
                {
                alert('提现金额必填');
                        return false;
                }
                if (money < {$tpshop_config['shopping_tikuan_1']} || money > {$user['user_money']})
                {
                    alert("每次最少提现额度{$tpshop_config['shopping_tikuan_1']},你的账户余额{$user['user_money']}");
                    return false;
                }

                if (bank_name == '')
                {
                    alert('银行名称必填');
                    return false;
                }
                if (account_bank == '')
                {
                    alert('收款账号必填');
                    return false;
                }
                if (account_name == '')
                {
                    alert('开户名必填');
                    return false;
                }
                if (secpwd == '')
                {
                    alert('交易密码不能为空');
                    return false;
                }
                $('#distribut_form').submit();
            }

        </script>	